from django import forms
from common.utils.custom_form_field import JsonArrayDateField, JsonArrayField


class GeneralReport(forms.Form):
    target_event_id = forms.CharField()
    chn_filter_list = JsonArrayField(required=False)


class ProfitAnalysisForm(forms.Form):
    time_range = JsonArrayDateField()
    sort_by = forms.CharField(required=False)
    to_export_file = forms.IntegerField(required=False)


class AggregateAnalysisForm(forms.Form):
    time_range = JsonArrayDateField()
    time_interval_type = forms.CharField(required=False)
    user_type = forms.CharField(required=False)
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)


class ChannelAnalysisForm(forms.Form):
    time_range = JsonArrayDateField()
    time_interval_type = forms.CharField(required=False)
    chn_filter_list = JsonArrayField(required=False)
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)


class OpUserAnalysisForm(forms.Form):
    time_range = JsonArrayDateField()
    user_type = forms.CharField(required=False)
    chn_filter_list = JsonArrayField(required=False)
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)


class RechargeAnalysisForm(forms.Form):
    time_range = JsonArrayDateField()
    time_interval_type = forms.CharField(required=False)
    chn_filter_list = JsonArrayField(required=False)
    user_type = forms.CharField(required=False)
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)


class DailyAnalysisForm(forms.Form):
    time_range = JsonArrayDateField()
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)
